home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 June / MacFormat 25.iso / Shareware City / Developers / OutOfPhase1.1 Source / OutOfPhase Folder / DeterminedNoteStructure.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-19  |  3.1 KB  |  108 lines  |  [TEXT/KAHL]

  1. /* DeterminedNoteStructure.h */
  2.  
  3. #ifndef Included_DeterminedNoteStructure_h
  4. #define Included_DeterminedNoteStructure_h
  5.  
  6. /* DeterminedNoteStructure module depends on */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* Memory */
  12. /* BinaryCodedDecimal */
  13. /* NoteObject */
  14. /* IncrementalParameterUpdator */
  15. /* FloatingPoint */
  16. /* Frequency */
  17. /* PlayTrackInfoThang */
  18.  
  19. struct FrozenNoteRec;
  20. typedef struct FrozenNoteRec FrozenNoteRec;
  21.  
  22. /* forwards */
  23. struct IncrParamUpdateRec;
  24. struct NoteObjectRec;
  25.  
  26. #ifdef ShowMeFrozenNoteRec
  27. struct FrozenNoteRec
  28.     {
  29.         /* reference to the note that defines this note.  this is used for determining */
  30.         /* the following things: */
  31.         /*   - hertz or halfsteps for portamento */
  32.         /*   - the target of a tie */
  33.         struct NoteObjectRec*        OriginalNote;
  34.  
  35.         /* frequency determined by pitch index + detuning, in Hertz */
  36.         float                                        NominalFrequency;
  37.  
  38.         /* frequency used for doing multisampling, in Hertz */
  39.         float                                        MultisampleFrequency;
  40.  
  41.         /* acceleration of envelopes */
  42.         float                                        HurryUpFactor;
  43.  
  44.         /* portamento duration, in envelope ticks */
  45.         long                                        PortamentoDuration;
  46.  
  47.         /* duration, in envelope ticks */
  48.         long                                        Duration;
  49.  
  50.         /* first release point, in envelope ticks after start of note */
  51.         long                                        ReleasePoint1;
  52.         MyBoolean                                Release1FromStart;
  53.         /* second release point, in envelope ticks after start of note */
  54.         long                                        ReleasePoint2;
  55.         MyBoolean                                Release2FromStart;
  56.         /* third release point, in envelope ticks after start of note */
  57.         long                                        ReleasePoint3;
  58.         MyBoolean                                Release3FromStart;
  59.  
  60.         /* overall loudness adjustment for envelopes, including global volume scaling */
  61.         float                                        LoudnessAdjust;
  62.  
  63.         /* stereo positioning for note */
  64.         float                                        StereoPosition;
  65.  
  66.         /* accent values for controlling envelopes */
  67.         float                                        Accent1;
  68.         float                                        Accent2;
  69.         float                                        Accent3;
  70.         float                                        Accent4;
  71.  
  72.         /* pitch displacement maximum depth */
  73.         float                                        PitchDisplacementDepthLimit;
  74.  
  75.         /* pitch displacement maximum rate, in LFO Hertz */
  76.         float                                        PitchDisplacementRateLimit;
  77.  
  78.         /* pitch displacement start point, in envelope clocks after start of note */
  79.         long                                        PitchDisplacementStartPoint;
  80.  
  81.         /* list crud */
  82.         FrozenNoteRec*                    Next;
  83.     };
  84. #endif
  85.  
  86. /* flush cached frozen note blocks */
  87. void                                FlushFrozenNoteStructures(void);
  88.  
  89. /* make sure the frozen note structure is valid */
  90. #if DEBUG
  91. void                                ValidateFrozenNote(FrozenNoteRec* FrozenNote);
  92. #else
  93. #define ValidateFrozenNote(x) ((void)0)
  94. #endif
  95.  
  96. /* dispose of a note object */
  97. void                                DisposeFrozenNote(FrozenNoteRec* FrozenNote);
  98.  
  99. /* build a new note object with all parameters determined.  *StartAdjustOut */
  100. /* indicates how many ticks before (negative) or after (positive) now that */
  101. /* the key-down should occur.  this is added to the scanning gap size and envelope */
  102. /* origins to figure out how to schedule the note */
  103. FrozenNoteRec*            FixNoteParameters(struct IncrParamUpdateRec* GlobalParamSource,
  104.                                             struct NoteObjectRec* Note, long* StartAdjustOut,
  105.                                             float OverallVolumeScaling, float EnvelopeTicksPerDurationTick);
  106.  
  107. #endif
  108.